<template>
  <div class="home">
    <el-row :gutter="20">
      <el-col :span="8">
        <el-card shadow="hover" class="stat-card">
          <template #header>
            <div class="card-header">
              <span>学生总数</span>
              <el-tag>统计</el-tag>
            </div>
          </template>
          <div class="card-body">
            <div class="number">128</div>
            <div class="desc">较上月增长 12%</div>
          </div>
        </el-card>
      </el-col>
      <el-col :span="8">
        <el-card shadow="hover" class="stat-card">
          <template #header>
            <div class="card-header">
              <span>教师总数</span>
              <el-tag type="success">统计</el-tag>
            </div>
          </template>
          <div class="card-body">
            <div class="number">24</div>
            <div class="desc">较上月增长 5%</div>
          </div>
        </el-card>
      </el-col>
      <el-col :span="8">
        <el-card shadow="hover" class="stat-card">
          <template #header>
            <div class="card-header">
              <span>课程总数</span>
              <el-tag type="warning">统计</el-tag>
            </div>
          </template>
          <div class="card-body">
            <div class="number">43</div>
            <div class="desc">较上月增长 15%</div>
          </div>
        </el-card>
      </el-col>
    </el-row>
  </div>
</template>

<script setup>
import { useAuthStore } from '../stores/authStore'

const authStore = useAuthStore()
</script>

<style scoped>
.home {
  min-height: calc(100vh - 116px);
}

.stat-card {
  transition: all 0.3s;
}

.stat-card:hover {
  transform: translateY(-5px);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-body {
  text-align: center;
  padding: 20px 0;
}

.number {
  font-size: 36px;
  font-weight: bold;
  color: var(--el-text-color-primary);
  line-height: 1;
  margin-bottom: 10px;
}

.desc {
  color: var(--el-text-color-secondary);
  font-size: 14px;
}
</style>